<%-- 
    Document   : wizardCompose
    Created on : 14/03/2013
    Author     : Volodymyr Lavrynovych <volodya.lavrynovych@gmail.com>
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib prefix="mg" tagdir="/WEB-INF/tags"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <mg:import file="/model/wizard.js"/>
        <script type="text/javascript">
            $(document).ready(function(){
                wizardModel('${obj.id}');
            })
        </script>
    </head>
    <body>
        <div id="step-holder" class="row-fluid">
            <table class="table table-bordered wizard-table">
                <thead>
                    <tr>
                        <th style="width: 5%">#</th>
                        <th style="width: 95%">Name</th>
                    </tr>
                </thead>
                <tbody>
                    <c:choose>
                        <c:when test="${empty obj.steps}">
                        </c:when>
                        <c:otherwise>
                            <c:forEach items="${obj.steps}" var="step">
                                <tr id="${step.id}" type="step">
                                    <td></td>
                                    <td>${step.title}</td>
                                </tr>
                                <c:forEach items="${step.fields}" var="field">
                                    <tr id="${field.id}" type="field" stepId="${step.id}">
                                        <td>-</td>
                                        <td>${field.title}</td>
                                    </tr>
                                </c:forEach>
                            </c:forEach>
                        </c:otherwise>
                    </c:choose>
                </tbody>
            </table>
        </div>
    </body>
</html>
